package com.aspose.cells;

import java.util.ArrayList;
import java.util.HashMap;

class zcej {
   private Workbook a;
   private zcda b;
   private zbxz c;
   private Worksheet d;
   private zpa e;
   private zoz f;
   private int g;
   private byte[] h;
   private int i;
   private boolean j;
   private boolean k;
   private Cells l;

   zcej(zcda var1) {
      this.b = var1;
      this.a = var1.a;
      this.f = var1.b;
   }

   void a(zpa var1, zbxz var2) throws Exception {
      this.b.d.a = var2;
      this.e = var1;
      this.d = var1.d;
      this.l = this.d.getCells();
      this.c = var2;

      while(true) {
         this.g = this.c.a();
         String var3;
         switch(this.g) {
         case 60:
            this.o();
            break;
         case 130:
            this.c.a(1L);
            return;
         case 133:
            this.q();
            break;
         case 145:
            this.m();
            break;
         case 147:
            this.p();
            break;
         case 161:
            this.f();
            break;
         case 177:
            this.c();
            break;
         case 392:
            this.a(this.d.getHorizontalPageBreaks());
            break;
         case 394:
            this.a(this.d.getVerticalPageBreaks());
            break;
         case 422:
            this.b();
            break;
         case 461:
            this.h();
            break;
         case 476:
            this.b(this.d.getPageSetup());
            break;
         case 477:
            this.a(this.d.getPageSetup());
            break;
         case 478:
            this.a((PageSetup)this.d.getPageSetup(), (znb)null);
            break;
         case 479:
            this.c(this.d.getPageSetup());
            break;
         case 485:
            this.r();
            break;
         case 494:
            this.k();
            break;
         case 500:
            this.a();
            break;
         case 535:
            this.l();
            break;
         case 550:
            this.h = this.b.a(this.c);
            var1.h = zcch.d(this.h, 0);
            if (var1.h == null) {
               throw new CellsException(6, "Invalid DrawingRid element");
            }

            var3 = var1.a(var1.h);
            this.d.g.c = "xl" + var3.substring(2);
            break;
         case 551:
            this.h = this.b.a(this.c);
            var1.f = zcch.d(this.h, 0);
            if (var1.f == null) {
               throw new CellsException(6, "Invalid legacyDrawing element");
            }

            var3 = var1.a(var1.f);
            if (var3.charAt(0) == '/') {
               this.d.g.d = "xl" + var3.substring(3);
            } else {
               this.d.g.d = "xl" + var3.substring(2);
            }
            break;
         case 552:
            this.h = this.b.a(this.c);
            var1.g = zcch.d(this.h, 0);
            break;
         case 562:
            this.h = this.b.a(this.c);
            var1.i = zcch.d(this.h, 0);
            break;
         case 573:
            this.i();
            break;
         case 639:
            this.d();
            break;
         case 644:
            this.e();
            break;
         case 1054:
            this.j();
            break;
         case 1135:
            this.g();
            break;
         default:
            this.i = this.c.b();
            this.c.a((long)this.i);
         }
      }
   }

   void a() throws Exception {
      this.h = this.b.a(this.c);
      ScenarioCollection var1 = this.d.getScenarios();
      var1.b = com.aspose.cells.b.a.zc.b(this.h, 0);
      var1.c = com.aspose.cells.b.a.zc.b(this.h, 2);
      var1.d = zcch.b(this.h, 4);
      Scenario var2 = null;

      while(true) {
         this.g = this.c.a();
         switch(this.g) {
         case 501:
            this.c.a(1L);
            return;
         case 502:
            this.h = this.b.a(this.c);
            var2 = new Scenario();
            var1.a(var2);
            byte var5 = 2;
            var2.e = this.h[var5] == 1;
            int var6 = var5 + 4;
            var2.d = this.h[var6] == 1;
            var6 += 4;
            var2.b = zcch.d(this.h, var6);
            var6 += 4 + (var2.b == null ? 0 : var2.b.length() * 2);
            var2.a = zcch.d(this.h, var6);
            var6 += 4 + (var2.getComment() == null ? 0 : var2.getComment().length() * 2);
            var2.c = zcch.d(this.h, var6);
            int var10000 = var6 + 4 + (var2.getUser() == null ? 0 : var2.getUser().length() * 2);
            break;
         case 503:
            this.c.a(1L);
            var2 = null;
            break;
         case 504:
            this.h = this.b.a(this.c);
            ScenarioInputCell var3 = new ScenarioInputCell();
            var2.getInputCells().a(var3);
            byte var4 = 0;
            var3.a = com.aspose.cells.b.a.zc.a(this.h, var4);
            int var7 = var4 + 4;
            var3.b = com.aspose.cells.b.a.zc.a(this.h, var7);
            var7 += 12;
            var3.d = com.aspose.cells.b.a.zc.b(this.h, var7);
            var7 += 2;
            var3.c = zcch.d(this.h, var7);
            break;
         default:
            this.i = this.c.b();
            this.c.a((long)this.i);
         }
      }
   }

   void b() throws Exception {
      this.c.a(1L);
      znb var1 = null;

      while(true) {
         this.g = this.c.a();
         switch(this.g) {
         case 151:
            this.a(var1.c());
            break;
         case 152:
            this.a(var1.d());
            break;
         case 392:
            this.a(var1.f());
            break;
         case 394:
            this.a(var1.g());
            break;
         case 423:
            var1 = new znb(this.d);
            this.d.D().a(var1);
            this.h = this.b.a(this.c);
            byte var2 = 0;
            byte[] var3 = new byte[16];
            System.arraycopy(this.h, var2, var3, 0, 16);
            var1.n = new com.aspose.cells.b.a.zh(var3);
            int var6 = var2 + 16;
            var1.q = com.aspose.cells.b.a.zc.a(this.h, var6);
            var6 += 4;
            var1.c(com.aspose.cells.b.a.zc.a(this.h, var6));
            var6 += 4;
            var1.g(com.aspose.cells.b.a.zc.a(this.h, var6));
            var6 += 4;
            int var4 = com.aspose.cells.b.a.zc.a(this.h, var6);
            var6 += 4;
            var1.d((var4 & 1) != 0);
            var1.l((var4 & 2) != 0);
            var1.m((var4 & 4) != 0);
            var1.n((var4 & 8) != 0);
            var1.r((var4 & 16) != 0);
            var1.q((var4 & 32) != 0);
            var1.e().setCenterHorizontally((var4 & 64) != 0);
            var1.e().setCenterVertically((var4 & 128) != 0);
            var1.e().setPrintHeadings((var4 & 256) != 0);
            var1.e().setPrintGridlines((var4 & 512) != 0);
            var1.e().setPercentScale((var4 & 1024) != 0);
            var1.h((var4 & 2048) != 0);
            var1.i((var4 & 4096) != 0);
            var1.f((var4 & 8192) != 0);
            var1.e((var4 & 16384) != 0);
            var1.k((var4 & 131072) != 0);
            var1.j((var4 & 262144) != 0);
            var1.a((var4 & 524288) != 0);
            var1.b((var4 & 2097152) != 0);
            switch(var4 & 12582912) {
            case 0:
               var1.e(0);
               break;
            case 4194304:
               var1.e(1);
               break;
            case 8388608:
               var1.e(2);
            }

            var1.g((var4 & 33554432) != 0);
            switch(var4 & 201326592) {
            case 0:
               var1.d(0);
               break;
            case 67108864:
               var1.d(1);
               break;
            case 134217728:
               var1.d(2);
            }

            var1.s((var4 & 536870912) != 0);
            CellArea var5 = zcch.a(this.h, var6);
            var1.a(var5.StartRow);
            var1.b(var5.StartColumn);
            break;
         case 424:
            this.c.a(1L);
            var1 = null;
            break;
         case 425:
            this.c.a(1L);
            return;
         case 476:
            this.b(var1.e());
            break;
         case 477:
            this.a(var1.e());
            break;
         case 478:
            this.a(var1.e(), var1);
            break;
         case 479:
            this.c(var1.e());
            break;
         default:
            this.i = this.c.b();
            this.c.a((long)this.i);
         }
      }
   }

   private void d() throws Exception {
      this.h = this.b.a(this.c);
      zox var1 = new zox(false);
      byte var2 = 14;
      var1.i = zase.y(com.aspose.cells.b.a.zc.a(this.h, 0));
      var1.k = (this.h[4] & 255 & 1) == 1;
      var1.b = zase.y(com.aspose.cells.b.a.zc.a(this.h, 8));
      var1.j = (this.h[12] & 255 & 1) == 1;
      int[] var3 = new int[]{var2};
      var1.f = zcch.a(this.h, var3);
      int var6 = var3[0];
      if (var1.j) {
         int var7 = com.aspose.cells.b.a.zc.a(this.h, var6);
         var1.l = new byte[var7 + 8];
         System.arraycopy(this.h, var6, var1.l, 0, var1.l.length);
      } else {
         var3 = new int[]{var6};
         String var4 = zcch.a(this.h, var3);
         var6 = var3[0];
         zqe var5 = this.e.b(var4);
         if (var5 != null) {
            var1.c = var5.e;
         }
      }

      this.e.p.put("\u0000s" + var1.b, var1);
   }

   private void e() throws Exception {
      zpf var1 = new zpf(false);
      this.h = this.b.a(this.c);
      byte var2 = 4;
      var1.b = zase.y(com.aspose.cells.b.a.zc.a(this.h, 0));
      int[] var3 = new int[]{var2};
      String var4 = zcch.a(this.h, var3);
      int var5 = var3[0];
      var1.c = this.e.a(var4);
      var3[0] = var5;
      var1.a = zcch.a(this.h, var3);
      var5 = var3[0];
      this.e.p.put("\u0000s" + var1.b, var1);
   }

   private void a(HorizontalPageBreakCollection var1) {
      this.h = this.b.a(this.c);
      int var2 = com.aspose.cells.b.a.zc.a(this.h, 0);

      while(true) {
         this.g = this.c.a();
         switch(this.g) {
         case 393:
            this.c.a(1L);
            return;
         case 396:
            this.a(false, (VerticalPageBreakCollection)null, var1);
            break;
         default:
            this.i = this.c.b();
            this.c.a((long)this.i);
         }
      }
   }

   private void a(VerticalPageBreakCollection var1) {
      this.h = this.b.a(this.c);
      int var2 = com.aspose.cells.b.a.zc.a(this.h, 0);

      while(true) {
         this.g = this.c.a();
         switch(this.g) {
         case 395:
            this.c.a(1L);
            return;
         case 396:
            this.a(true, var1, (HorizontalPageBreakCollection)null);
            break;
         default:
            this.i = this.c.b();
            this.c.a((long)this.i);
         }
      }
   }

   private void a(boolean var1, VerticalPageBreakCollection var2, HorizontalPageBreakCollection var3) {
      this.h = this.b.a(this.c);
      int var4 = com.aspose.cells.b.a.zc.a(this.h, 0);
      int var5 = com.aspose.cells.b.a.zc.a(this.h, 4);
      int var6 = com.aspose.cells.b.a.zc.a(this.h, 8);
      if (var6 < var5) {
         int var7 = var5;
         var5 = var6;
         var6 = var7;
      }

      if (var1) {
         var2.a(var5, var6, var4);
      } else {
         var3.a(var4, var5, var6);
      }

   }

   private void f() throws Exception {
      this.h = this.b.a(this.c);
      AutoFilter var1 = this.d.getAutoFilter();
      Name var2 = this.a.getWorksheets().getNames().a("_FILTERDATABASE", this.d.getIndex());
      if (var2 != null) {
         var1.a(var2);
      }

      int var3 = com.aspose.cells.b.a.zc.a(this.h, 0);
      int var4 = com.aspose.cells.b.a.zc.a(this.h, 4);
      int var5 = com.aspose.cells.b.a.zc.a(this.h, 8);
      int var6 = com.aspose.cells.b.a.zc.a(this.h, 12);
      var1.setRange(var3, var5, var6);

      while(true) {
         this.g = this.c.a();
         switch(this.g) {
         case 162:
            this.c.a(1L);
            return;
         case 163:
            this.a(var1);
            break;
         default:
            this.i = this.c.b();
            this.c.a((long)this.i);
         }
      }
   }

   private void a(AutoFilter var1) throws Exception {
      this.h = this.b.a(this.c);
      int var2 = com.aspose.cells.b.a.zc.a(this.h, 0);
      boolean var3 = (this.h[4] & 255 & 1) == 1;
      boolean var4 = (this.h[4] & 255 & 2) == 0;
      FilterColumn var5 = null;

      while(true) {
         this.g = this.c.a();
         switch(this.g) {
         case 164:
            this.c.a(1L);
            if (var5 != null) {
               var1.e.a(var5);
            }

            return;
         case 165:
            var5 = new FilterColumn(var1.e, var2, var3, var4);
            var5.setFilterType(3);
            MultipleFilterCollection var26 = new MultipleFilterCollection();
            var5.setFilter(var26);
            this.a(var26);
            break;
         case 166:
         case 167:
         default:
            this.i = this.c.b();
            this.c.a((long)this.i);
            break;
         case 168:
            this.h = this.b.a(this.c);
            var5 = new FilterColumn(var1.e, var2, var3, var4);
            var5.setFilterType(0);
            ColorFilter var22 = new ColorFilter(var5);
            var5.setFilter(var22);
            var22.setFilterByFillColor(this.h[4] == 1);
            var22.a(com.aspose.cells.b.a.zc.a(this.h, 0));
            break;
         case 169:
            this.h = this.b.a(this.c);
            int var23 = com.aspose.cells.b.a.zc.a(this.h, 0);
            int var24 = com.aspose.cells.b.a.zc.a(this.h, 4);
            var5 = new FilterColumn(var1.e, var2, var3, var4);
            var5.setFilterType(4);
            IconFilter var25 = new IconFilter(var5);
            var5.setFilter(var25);
            var25.setIconSetType(zcee.q(var23));
            var25.setIconId(var24);
            break;
         case 170:
            this.h = this.b.a(this.c);
            var5 = new FilterColumn(var1.e, var2, var3, var4);
            var5.setFilterType(5);
            boolean var13 = (this.h[0] & 255 & 1) != 0;
            boolean var14 = (this.h[0] & 255 & 2) != 0;
            boolean var15 = (this.h[0] & 255 & 4) != 0;
            double var16 = com.aspose.cells.b.a.zc.f(this.h, 1);
            double var18 = com.aspose.cells.b.a.zc.f(this.h, 9);
            int var20 = 10;
            if (var15) {
               var20 = (int)var16;
            }

            Top10Filter var21 = new Top10Filter(var13, var14, var20);
            var5.setFilter(var21);

            try {
               var21.setCriteria(var18);
            } catch (Exception var28) {
               ;
            }
            break;
         case 171:
            this.h = this.b.a(this.c);
            var5 = new FilterColumn(var1.e, var2, var3, var4);
            var5.setFilterType(2);
            DynamicFilter var6 = new DynamicFilter();
            var5.setFilter(var6);
            int var7 = com.aspose.cells.b.a.zc.a(this.h, 0);
            var6.setDynamicFilterType(zcee.t(var7));
            boolean var8 = this.h[4] == 1;
            double var9 = com.aspose.cells.b.a.zc.f(this.h, 5);
            double var11 = com.aspose.cells.b.a.zc.f(this.h, 13);
            if (var8) {
               var6.setMaxValue(var11);
            }

            var6.setValue(var9);
            break;
         case 172:
            var5 = new FilterColumn(var1.e, var2, var3, var4);
            var5.setFilterType(1);
            CustomFilterCollection var27 = new CustomFilterCollection();
            var5.setFilter(var27);
            this.a(var27);
         }
      }
   }

   private void a(CustomFilterCollection var1) throws Exception {
      this.h = this.b.a(this.c);
      boolean var2 = this.h[0] == 1;
      var1.setAnd(var2);

      while(true) {
         this.g = this.c.a();
         switch(this.g) {
         case 173:
            this.c.a(1L);
            return;
         case 174:
            this.h = this.b.a(this.c);
            byte var3 = this.h[0];
            byte var4 = this.h[1];
            CustomFilter var5 = new CustomFilter();
            var1.a(var5);
            var5.setFilterOperatorType(zcee.v(var4 & 255));
            if (var3 == 6) {
               String var6 = zcch.d(this.h, 10);
               var5.setCriteria(var6);
            } else {
               var5.setCriteria(com.aspose.cells.b.a.zc.f(this.h, 2));
            }
         }
      }
   }

   private void a(MultipleFilterCollection var1) throws Exception {
      this.h = this.b.a(this.c);
      boolean var2 = this.h[0] == 1;
      if (var2) {
         var1.setMatchBlank(true);
      }

      int var3 = com.aspose.cells.b.a.zc.a(this.h, 4);
      var1.b = zcee.s(var3);

      while(true) {
         this.g = this.c.a();
         switch(this.g) {
         case 166:
            this.c.a(1L);
            return;
         case 167:
            this.h = this.b.a(this.c);
            String var4 = zcch.d(this.h, 0);
            var1.b(var4);
            break;
         case 175:
            this.h = this.b.a(this.c);
            DateTimeGroupItem var5 = new DateTimeGroupItem();
            var1.a(var5);
            var5.setYear(com.aspose.cells.b.a.zc.b(this.h, 0));
            var5.setMonth(com.aspose.cells.b.a.zc.b(this.h, 2));
            var5.setDay(com.aspose.cells.b.a.zc.b(this.h, 4));
            var5.setHour(com.aspose.cells.b.a.zc.b(this.h, 6));
            var5.setMinute(com.aspose.cells.b.a.zc.b(this.h, 8));
            var5.setSecond(com.aspose.cells.b.a.zc.b(this.h, 10));
            var5.setDateTimeGroupingType(zcee.x(com.aspose.cells.b.a.zc.a(this.h, 20)));
            break;
         default:
            this.i = this.c.b();
            this.c.a((long)this.i);
         }
      }
   }

   private void g() throws Exception {
      this.c.a(1L);
      FormatConditionCollection var1 = null;
      FormatCondition var2 = null;

      while(true) {
         this.g = this.c.a();
         zbzl var3;
         switch(this.g) {
         case 507:
            this.h = this.c.d();
            var3 = zcdp.a(this.h, 4, (WorksheetCollection)this.d.c());
            var2.f = var3.b;
            break;
         case 1046:
            byte var17 = 0;
            this.h = this.b.a(this.c);
            var1 = new FormatConditionCollection(this.d.getConditionalFormattings());
            zcbx var20 = new zcbx();
            int var19 = var20.a(this.h, var17);
            var1.d = this.h[var19 + 4] == 1;
            var1.b = var20.a();
            break;
         case 1047:
            var2 = null;
            if (var1.getCount() > 0) {
               this.d.getConditionalFormattings().a(var1);
            }

            var1 = null;
            this.c.a(1L);
            break;
         case 1048:
            var2 = null;
            boolean var16 = true;
            this.h = this.b.a(this.c);
            byte var4 = 0;
            zcbx var5 = new zcbx();
            int var18 = var5.a(this.h, var4);
            boolean var6 = this.h[var18 + 46 + 16] == 1;
            int var9;
            if (var6) {
               byte[] var7 = new byte[16];
               System.arraycopy(this.h, var18 + 46, var7, 0, 16);
               com.aspose.cells.b.a.zh var8 = new com.aspose.cells.b.a.zh(var7);
               var9 = this.d.getConditionalFormattings().getCount();
               if (var9 > 0 && var6) {
                  for(int var10 = 0; var10 < var9; ++var10) {
                     FormatConditionCollection var11 = this.d.getConditionalFormattings().get(var10);

                     for(int var12 = 0; var12 < var11.getCount(); ++var12) {
                        FormatCondition var13 = var11.get(var12);
                        if (var8.equals(var13.b())) {
                           var16 = false;
                           var2 = var13;
                           break;
                        }
                     }

                     if (var2 != null) {
                        break;
                     }
                  }
               }
            }

            if (var2 == null) {
               var2 = new FormatCondition(var1);
            }

            int var21 = this.h[var18] & 255;
            int var22 = com.aspose.cells.b.a.zc.a(this.h, var18 + 4);
            var9 = com.aspose.cells.b.a.zc.a(this.h, var18 + 8);
            short var23 = com.aspose.cells.b.a.zc.b(this.h, var18 + 12);
            if (var23 != -1) {
               var2.setPriority(var23);
            }

            int var24 = com.aspose.cells.b.a.zc.a(this.h, var18 + 16);
            zcee.a(this.h, var21, var22, var24, var2);
            var2.setOperator(zcee.a(var24));
            if (var9 >= 0 && var9 < this.a.getWorksheets().getDxfs().getCount()) {
               var2.getStyle().copy(this.a.getWorksheets().getDxfs().get(var9));
            }

            var2.setStopIfTrue((this.h[var18 + 28] & 255 & 2) != 0);
            com.aspose.cells.b.a.zc.a(this.h, var18 + 30);
            com.aspose.cells.b.a.zc.a(this.h, var18 + 34);
            com.aspose.cells.b.a.zc.a(this.h, var18 + 38);
            if (var5.c != null) {
               for(int var15 = 0; var15 < var5.c.length; ++var15) {
                  if (var15 == 0) {
                     var2.a(var5.c[0]);
                  } else {
                     var2.b(var5.c[var15]);
                  }
               }
            }

            var18 += 46;
            var18 += 20;
            if (var18 < this.h.length) {
               var2.setText(zcch.d(this.h, var18));
            }

            if (var16) {
               var1.a(var2);
            }
            break;
         case 1049:
            var2 = null;
            this.c.a(1L);
            break;
         case 1051:
            this.f(var2);
            break;
         case 1052:
            this.b(var2);
            break;
         case 1136:
            this.c.a(1L);
            return;
         case 1157:
            this.h(var2);
            break;
         case 1171:
            this.h = this.c.d();
            var3 = zcdp.a(this.h, 4, (WorksheetCollection)this.d.c());
            var2.f = var3.b;
            break;
         default:
            this.i = this.c.b();
            this.c.a((long)this.i);
         }
      }
   }

   private void h() throws Exception {
      this.h = this.b.a(this.c);
      int var1 = this.d.getConditionalFormattings().add();
      FormatConditionCollection var2 = this.d.getConditionalFormattings().get(var1);
      var2.d = this.h[4] == 1;
      FormatCondition var3 = null;
      var2.b = zcch.b(this.h, 8);

      while(true) {
         this.g = this.c.a();
         switch(this.g) {
         case 462:
            this.c.a(1L);
            return;
         case 463:
            this.h = this.b.a(this.c);
            var3 = new FormatCondition(var2);
            var2.a(var3);
            int var4 = this.h[0] & 255;
            int var5 = com.aspose.cells.b.a.zc.a(this.h, 4);
            int var6 = com.aspose.cells.b.a.zc.a(this.h, 16);
            zcee.a(this.h, var4, var5, var6, var3);
            var3.setOperator(zcee.a(com.aspose.cells.b.a.zc.a(this.h, 16)));
            int var7 = com.aspose.cells.b.a.zc.a(this.h, 8);
            if (var7 != -1 && var7 < this.a.getWorksheets().getDxfs().getCount()) {
               var3.getStyle().copy(this.a.getWorksheets().getDxfs().get(var7));
            }

            var3.setStopIfTrue((this.h[28] & 255 & 2) != 0);
            var3.setPriority(com.aspose.cells.b.a.zc.b(this.h, 12));
            int var8 = com.aspose.cells.b.a.zc.a(this.h, 30);
            int var9 = com.aspose.cells.b.a.zc.a(this.h, 34);
            int var10 = com.aspose.cells.b.a.zc.a(this.h, 38);
            var3.setText(zcch.d(this.h, 42));
            boolean var11 = false;
            int var14;
            if (var3.getText() != null) {
               var14 = 46 + var3.getText().length() * 2;
            } else {
               var14 = 46;
               if (var8 != 0) {
                  var8 = com.aspose.cells.b.a.zc.a(this.h, var14);
                  var3.a(new byte[var8 + 8]);
                  System.arraycopy(this.h, var14, var3.a(), 0, var3.a().length);
                  var14 += var3.a().length;
               }

               if (var9 != 0) {
                  var9 = com.aspose.cells.b.a.zc.a(this.h, var14);
                  var3.b(new byte[var9 + 8]);
                  System.arraycopy(this.h, var14, var3.c(), 0, var3.c().length);
                  int var10000 = var14 + var3.c().length;
               }

               if (var10 != 0) {
                  ;
               }
            }
            break;
         case 465:
            this.a(var3);
            break;
         case 467:
            this.e(var3);
            break;
         case 469:
            this.g(var3);
            break;
         case 1146:
            this.h = this.b.a(this.c);
            byte var12 = 4;
            byte[] var13 = new byte[16];
            System.arraycopy(this.h, var12, var13, 0, 16);
            var3.a(new com.aspose.cells.b.a.zh(var13));
            break;
         default:
            this.i = this.c.b();
            this.c.a((long)this.i);
         }
      }
   }

   private void a(FormatCondition var1) {
      IconSet var2 = new IconSet(var1);
      this.h = this.b.a(this.c);
      int var3 = com.aspose.cells.b.a.zc.a(this.h, 0);
      var2.a(zcee.q(var3));
      if ((this.h[4] & 255 & 2) == 0) {
         var2.setShowValue(true);
      } else {
         var2.setShowValue(false);
      }

      if ((this.h[4] & 255 & 4) != 0) {
         var2.setReverse(true);
      }

      var1.a(var2);

      while(true) {
         this.g = this.c.a();
         switch(this.g) {
         case 466:
            this.c.a(1L);
            return;
         case 471:
            ConditionalFormattingValue var4 = this.c(var1);
            var2.getCfvos().a(var4);
            break;
         default:
            this.i = this.c.b();
            this.c.a((long)this.i);
         }
      }
   }

   private void b(FormatCondition var1) throws Exception {
      IconSet var2 = new IconSet(var1);
      this.h = this.b.a(this.c);
      byte var3 = 4;
      int var4 = com.aspose.cells.b.a.zc.a(this.h, var3);
      var2.a(zcee.q(var4));
      if ((this.h[var3 + 4] & 255 & 2) == 0) {
         var2.setShowValue(true);
      } else {
         var2.setShowValue(false);
      }

      if ((this.h[var3 + 4] & 255 & 4) != 0) {
         var2.setReverse(true);
      }

      var1.a(var2);
      int var5 = 0;

      while(true) {
         this.g = this.c.a();
         switch(this.g) {
         case 1050:
            ConditionalFormattingValue var6 = this.d(var1);
            var2.getCfvos().a(var6);
            break;
         case 1112:
            this.h = this.b.a(this.c);
            var3 = 4;
            var4 = com.aspose.cells.b.a.zc.a(this.h, var3);
            int var8 = var3 + 4;
            ConditionalFormattingIcon var7 = var2.getCfIcons().get(var5++);
            var7.setType(zcee.q(var4));
            var7.setIndex(com.aspose.cells.b.a.zc.a(this.h, var8));
            break;
         case 1155:
            this.c.a(1L);
            return;
         default:
            this.i = this.c.b();
            this.c.a((long)this.i);
         }
      }
   }

   private ConditionalFormattingValue c(FormatCondition var1) {
      ConditionalFormattingValue var2 = new ConditionalFormattingValue(var1);
      this.h = this.b.a(this.c);
      int var3 = com.aspose.cells.b.a.zc.a(this.h, 0);
      var2.setType(zcee.z(var3));
      double var4 = com.aspose.cells.b.a.zc.f(this.h, 4);
      var2.a(var4);
      if (this.h[12] == 1) {
         if (this.h[16] == 1) {
            var2.setGTE(true);
         } else {
            var2.setGTE(false);
         }
      }

      byte var6 = 20;
      int var7 = com.aspose.cells.b.a.zc.a(this.h, var6);
      if (var7 > 0) {
         byte[] var8 = new byte[this.h.length - 24];
         System.arraycopy(this.h, 24, var8, 0, var8.length);
         var2.a(var8);
      }

      return var2;
   }

   private ConditionalFormattingValue d(FormatCondition var1) throws Exception {
      ConditionalFormattingValue var2 = new ConditionalFormattingValue(var1);
      this.h = this.b.a(this.c);
      byte var3 = 0;
      zcbx var4 = new zcbx();
      int var9 = var4.a(this.h, var3);
      int var5 = com.aspose.cells.b.a.zc.a(this.h, var9 + 0);
      var2.setType(zcee.z(var5));
      var9 += 4;
      double var6 = com.aspose.cells.b.a.zc.f(this.h, var9);
      var2.a(var6);
      var9 += 8;
      if (this.h[var9] == 1) {
         if (this.h[var9 + 4] == 1) {
            var2.setGTE(true);
         } else {
            var2.setGTE(false);
         }
      }

      var9 += 8;
      int var8 = com.aspose.cells.b.a.zc.a(this.h, var9);
      if (var8 > 0) {
         var2.a(var4.c[0]);
      }

      return var2;
   }

   private void e(FormatCondition var1) {
      DataBar var2 = new DataBar(this.a, var1);
      this.h = this.b.a(this.c);
      var2.setMinLength(this.h[0]);
      var2.setMaxLength(this.h[1]);
      var2.setShowValue(this.h[2] == 1);

      while(true) {
         this.g = this.c.a();
         switch(this.g) {
         case 468:
            this.c.a(1L);
            var1.a(var2);
            return;
         case 471:
            ConditionalFormattingValue var3 = this.c(var1);
            if (var2.a == null) {
               var2.a = var3;
            } else {
               var2.b = var3;
            }
            break;
         case 564:
            byte var4 = 0;
            boolean var5 = false;
            this.h = this.b.a(this.c);
            boolean[] var6 = new boolean[]{var5};
            var2.b(zcdp.a(this.h, var4, (boolean[])var6));
            var5 = var6[0];
            break;
         default:
            this.i = this.c.b();
            this.c.a((long)this.i);
         }
      }
   }

   private void f(FormatCondition var1) throws Exception {
      DataBar var2 = var1.getDataBar();
      this.h = this.b.a(this.c);
      byte var3 = 4;
      var2.setMinLength(this.h[var3 + 0]);
      var2.setMaxLength(this.h[var3 + 1]);
      var2.setShowValue(this.h[var3 + 2] == 1);
      var2.setDirection(zcee.i(this.h[var3 + 3] & 255));
      var2.setAxisPosition(zcee.k(this.h[var3 + 4] & 255));
      byte var4 = this.h[var3 + 5];
      if ((var4 & 255 & 1) != 0) {
         var2.getBarBorder().setType(1);
      } else {
         var2.getBarBorder().setType(0);
      }

      if ((var4 & 255 & 2) != 0) {
         var2.setBarFillType(1);
      } else {
         var2.setBarFillType(0);
      }

      if ((var4 & 255 & 4) != 0) {
         var2.getNegativeBarFormat().setColorType(0);
      }

      if ((var4 & 255 & 8) != 0) {
         var2.getNegativeBarFormat().setBorderColorType(0);
      }

      int var5 = 0;
      ArrayList var6 = new ArrayList();
      if (var2.getBarBorder().getType() == 1) {
         com.aspose.cells.b.a.a.ze.a(var6, (Object)var2.getBarBorder().a());
      }

      if (var2.getNegativeBarFormat().getColorType() == 0) {
         com.aspose.cells.b.a.a.ze.a(var6, (Object)var2.getNegativeBarFormat().b());
      }

      if (var2.getNegativeBarFormat().getBorderColorType() == 0) {
         com.aspose.cells.b.a.a.ze.a(var6, (Object)var2.getNegativeBarFormat().a());
      }

      if (var2.getAxisPosition() != 2) {
         com.aspose.cells.b.a.a.ze.a(var6, (Object)var2.a());
      }

      while(true) {
         this.g = this.c.a();
         switch(this.g) {
         case 1050:
            ConditionalFormattingValue var7 = this.d(var1);
            if (var2.a == null) {
               var2.a = var7;
            } else {
               var2.b = var7;
            }
            break;
         case 1055:
            var3 = 4;
            boolean var8 = false;
            this.h = this.b.a(this.c);
            boolean[] var9 = new boolean[]{var8};
            zakp var10 = zcdp.a(this.h, var3, (boolean[])var9);
            var8 = var9[0];
            if (var5 < var6.size()) {
               ((zakp)var6.get(var5)).f(var10);
            }

            ++var5;
            break;
         case 1156:
            this.c.a(1L);
            var1.a(var2);
            return;
         default:
            this.i = this.c.b();
            this.c.a((long)this.i);
         }
      }
   }

   private void g(FormatCondition var1) {
      ColorScale var2 = new ColorScale(this.a, var1);
      ConditionalFormattingValueCollection var3 = new ConditionalFormattingValueCollection(var1);
      ArrayList var4 = new ArrayList(3);
      this.h = this.b.a(this.c);

      while(true) {
         this.g = this.c.a();
         switch(this.g) {
         case 470:
            this.c.a(1L);
            if (var3.getCount() == 2) {
               var2.a = var3.get(0);
               var2.c = var3.get(1);
               var2.d = (zakp)var4.get(0);
               var2.c((zakp)var4.get(1));
            } else if (var3.getCount() == 3) {
               var2.a = var3.get(0);
               var2.b = var3.get(1);
               var2.c = var3.get(2);
               var2.a((zakp)var4.get(0));
               var2.b((zakp)var4.get(1));
               var2.c((zakp)var4.get(2));
            }

            var1.a(var2);
            return;
         case 471:
            ConditionalFormattingValue var5 = this.c(var1);
            var3.a(var5);
            break;
         case 564:
            byte var6 = 0;
            boolean var7 = false;
            this.h = this.b.a(this.c);
            boolean[] var8 = new boolean[]{var7};
            zakp var9 = zcdp.a(this.h, var6, (boolean[])var8);
            var7 = var8[0];
            com.aspose.cells.b.a.a.ze.a(var4, (Object)var9);
            break;
         default:
            this.i = this.c.b();
            this.c.a((long)this.i);
         }
      }
   }

   private void h(FormatCondition var1) throws Exception {
      ColorScale var2 = new ColorScale(this.a, var1);
      ConditionalFormattingValueCollection var3 = new ConditionalFormattingValueCollection(var1);
      ArrayList var4 = new ArrayList(3);
      this.h = this.b.a(this.c);

      while(true) {
         this.g = this.c.a();
         switch(this.g) {
         case 1050:
            ConditionalFormattingValue var5 = this.d(var1);
            var3.a(var5);
            break;
         case 1055:
            byte var6 = 4;
            boolean var7 = false;
            this.h = this.b.a(this.c);
            boolean[] var8 = new boolean[]{var7};
            zakp var9 = zcdp.a(this.h, var6, (boolean[])var8);
            var7 = var8[0];
            com.aspose.cells.b.a.a.ze.a(var4, (Object)var9);
            break;
         case 1158:
            this.c.a(1L);
            if (var3.getCount() == 2) {
               var2.a = var3.get(0);
               var2.c = var3.get(1);
               var2.d = (zakp)var4.get(0);
               var2.c((zakp)var4.get(1));
            } else if (var3.getCount() == 3) {
               var2.a = var3.get(0);
               var2.b = var3.get(1);
               var2.c = var3.get(2);
               var2.a((zakp)var4.get(0));
               var2.b((zakp)var4.get(1));
               var2.c((zakp)var4.get(2));
            }

            var1.a(var2);
            return;
         default:
            this.i = this.c.b();
            this.c.a((long)this.i);
         }
      }
   }

   private void i() throws Exception {
      this.h = this.b.a(this.c);
      ValidationCollection var1 = this.d.getValidations();

      while(true) {
         this.g = this.c.a();
         switch(this.g) {
         case 64:
            this.h = this.b.a(this.c);
            Validation var2 = new Validation(var1);
            var1.add(var2);
            int var3 = this.h[0] & 255 & 15;
            switch(var3) {
            case 0:
               var2.setType(0);
               break;
            case 1:
               var2.setType(1);
               break;
            case 2:
               var2.setType(2);
               break;
            case 3:
               var2.setType(3);
               break;
            case 4:
               var2.setType(4);
               break;
            case 5:
               var2.setType(5);
               break;
            case 6:
               var2.setType(6);
               break;
            case 7:
               var2.setType(7);
            }

            var3 = this.h[0] & 255 & 112;
            switch(var3) {
            case 0:
               var2.setAlertStyle(1);
               break;
            case 16:
               var2.setAlertStyle(2);
               break;
            case 32:
               var2.setAlertStyle(0);
            }

            var3 = this.h[1] & 255 & 1;
            if (var3 != 0) {
               var2.setIgnoreBlank(true);
            } else {
               var2.setIgnoreBlank(false);
            }

            var3 = this.h[1] & 255 & 2;
            if (var3 == 0) {
               var2.setInCellDropDown(true);
            } else {
               var2.setInCellDropDown(false);
            }

            var3 = ((this.h[2] & 255 & 3) << 6) + ((this.h[1] & 255 & 252) >> 2);
            switch(var3) {
            case 0:
               var2.a(0);
               break;
            case 1:
               var2.a(1);
               break;
            case 2:
               var2.a(2);
               break;
            case 3:
            default:
               var2.a(0);
            case 4:
            case 5:
            case 6:
            case 7:
            case 8:
            case 9:
            case 10:
            }

            var3 = this.h[2] & 255 & 4;
            if (var3 == 0) {
               var2.setShowInput(false);
            } else {
               var2.setShowInput(true);
            }

            var3 = this.h[2] & 255 & 8;
            if (var3 == 0) {
               var2.setShowError(false);
            } else {
               var2.setShowError(true);
            }

            var3 = this.h[2] & 255 & 240;
            switch(var3) {
            case 0:
               var2.setOperator(0);
               break;
            case 16:
               var2.setOperator(7);
               break;
            case 32:
               var2.setOperator(1);
               break;
            case 48:
               var2.setOperator(8);
               break;
            case 64:
               var2.setOperator(2);
               break;
            case 80:
               var2.setOperator(4);
               break;
            case 96:
               var2.setOperator(3);
               break;
            case 112:
               var2.setOperator(5);
            }

            byte var4 = 4;
            int var5 = com.aspose.cells.b.a.zc.a(this.h, var4);
            int var12 = var4 + 4;

            for(int var6 = 0; var6 < var5; ++var6) {
               CellArea var7 = new CellArea();
               var7.StartRow = com.aspose.cells.b.a.zc.a(this.h, var12);
               var7.EndRow = com.aspose.cells.b.a.zc.a(this.h, var12 + 4);
               var7.StartColumn = com.aspose.cells.b.a.zc.a(this.h, var12 + 8);
               var7.EndColumn = com.aspose.cells.b.a.zc.a(this.h, var12 + 12);
               com.aspose.cells.b.a.a.ze.a(var2.getAreaList(), (Object)var7);
               var12 += 16;
            }

            int[] var13 = new int[]{var12};
            var2.setErrorTitle(zcch.a(this.h, var13));
            var12 = var13[0];
            var13[0] = var12;
            var2.setErrorMessage(zcch.a(this.h, var13));
            var12 = var13[0];
            var13[0] = var12;
            var2.setInputTitle(zcch.a(this.h, var13));
            var12 = var13[0];
            var13[0] = var12;
            var2.setInputMessage(zcch.a(this.h, var13));
            var12 = var13[0];
            int var14 = com.aspose.cells.b.a.zc.a(this.h, var12);
            var2.a(new byte[var14]);
            var12 += 4;
            System.arraycopy(this.h, var12, (byte[])var2.d(), 0, var14);
            var12 += var14 + 4;
            var14 = com.aspose.cells.b.a.zc.a(this.h, var12);
            var2.b(new byte[var14]);
            var12 += 4;
            System.arraycopy(this.h, var12, (byte[])var2.e(), 0, var14);
            int var10000 = var12 + var14 + 4;
            int var8 = 1048575;
            int var9 = 0;

            for(int var10 = var2.getAreaList().size() - 1; var10 >= 0; --var10) {
               CellArea var11 = (CellArea)var2.getAreaList().get(var10);
               if (var11.StartRow < var8) {
                  var8 = var11.StartRow;
                  var9 = var11.StartColumn;
               }
            }

            String var15 = Validation.a(this.a.getWorksheets(), var2.d(), 0, var2.getType(), var8, var9);
            String var16 = Validation.a(this.a.getWorksheets(), var2.e(), 0, var2.getType(), var8, var9);
            var2.a(var15);
            var2.b(var16);
            break;
         case 574:
            this.c.a(1L);
            return;
         default:
            this.i = this.c.b();
            this.c.a((long)this.i);
         }
      }
   }

   private void j() {
      this.h = this.b.a(this.c);
      ValidationCollection var1 = this.d.getValidations();

      while(true) {
         this.g = this.c.a();
         switch(this.g) {
         case 1053:
            this.h = this.b.a(this.c);
            Validation var2 = new Validation(var1);
            var1.add(var2);
            byte var3 = this.h[0];
            boolean var4 = (var3 & 255 & 2) != 0;
            boolean var5 = (var3 & 255 & 4) != 0;
            byte var6 = 4;
            com.aspose.cells.b.a.zc.a(this.h, var6);
            int var15 = var6 + 4;
            var15 += 4;
            int var8 = com.aspose.cells.b.a.zc.a(this.h, var15);
            var15 += 4;
            int var9;
            if (var8 > 0) {
               for(var9 = 0; var9 < var8; ++var9) {
                  CellArea var10 = new CellArea();
                  var10.StartRow = com.aspose.cells.b.a.zc.a(this.h, var15);
                  var10.EndRow = com.aspose.cells.b.a.zc.a(this.h, var15 + 4);
                  var10.StartColumn = com.aspose.cells.b.a.zc.a(this.h, var15 + 8);
                  var10.EndColumn = com.aspose.cells.b.a.zc.a(this.h, var15 + 12);
                  com.aspose.cells.b.a.a.ze.a(var2.getAreaList(), (Object)var10);
                  var15 += 16;
               }
            }

            if (var5) {
               var15 += 4;
               var15 += 4;
               var9 = com.aspose.cells.b.a.zc.a(this.h, var15);
               var2.a(new byte[var9]);
               var15 += 4;
               int var16 = com.aspose.cells.b.a.zc.a(this.h, var15);
               var2.b(new byte[var16]);
               var15 += 4;
               System.arraycopy(this.h, var15, (byte[])var2.d(), 0, var9);
               var15 += var9;
               System.arraycopy(this.h, var15, (byte[])var2.e(), 0, var16);
               var15 += var16;
               int var11 = 1048575;
               int var12 = 0;

               for(int var13 = var2.getAreaList().size() - 1; var13 >= 0; --var13) {
                  CellArea var14 = (CellArea)var2.getAreaList().get(var13);
                  if (var14.StartRow < var11) {
                     var11 = var14.StartRow;
                     var12 = var14.StartColumn;
                  }
               }

               String var17 = Validation.a(this.a.getWorksheets(), var2.d(), 0, var2.getType(), var11, var12);
               String var18 = Validation.a(this.a.getWorksheets(), var2.e(), 0, var2.getType(), var11, var12);
               var2.a(var17);
               var2.b(var18);
            }

            this.a(var15, var2);
            break;
         case 1154:
            this.c.a(1L);
            return;
         default:
            this.i = this.c.b();
            this.c.a((long)this.i);
         }
      }
   }

   private void a(int var1, Validation var2) {
      int var3 = this.h[var1] & 255 & 15;
      switch(var3) {
      case 0:
         var2.setType(0);
         break;
      case 1:
         var2.setType(1);
         break;
      case 2:
         var2.setType(2);
         break;
      case 3:
         var2.setType(3);
         break;
      case 4:
         var2.setType(4);
         break;
      case 5:
         var2.setType(5);
         break;
      case 6:
         var2.setType(6);
         break;
      case 7:
         var2.setType(7);
      }

      var3 = this.h[var1] & 255 & 112;
      switch(var3) {
      case 0:
         var2.setAlertStyle(1);
         break;
      case 16:
         var2.setAlertStyle(2);
         break;
      case 32:
         var2.setAlertStyle(0);
      }

      var3 = this.h[var1 + 1] & 255 & 1;
      if (var3 != 0) {
         var2.setIgnoreBlank(true);
      } else {
         var2.setIgnoreBlank(false);
      }

      var3 = this.h[var1 + 1] & 255 & 2;
      if (var3 == 0) {
         var2.setInCellDropDown(true);
      } else {
         var2.setInCellDropDown(false);
      }

      var3 = ((this.h[var1 + 2] & 255 & 3) << 6) + ((this.h[var1 + 1] & 255 & 252) >> 2);
      switch(var3) {
      case 0:
         var2.a(0);
         break;
      case 1:
         var2.a(1);
         break;
      case 2:
         var2.a(2);
         break;
      case 3:
      default:
         var2.a(0);
      case 4:
      case 5:
      case 6:
      case 7:
      case 8:
      case 9:
      case 10:
      }

      var3 = this.h[var1 + 2] & 255 & 4;
      if (var3 == 0) {
         var2.setShowInput(false);
      } else {
         var2.setShowInput(true);
      }

      var3 = this.h[var1 + 2] & 255 & 8;
      if (var3 == 0) {
         var2.setShowError(false);
      } else {
         var2.setShowError(true);
      }

      var3 = this.h[var1 + 2] & 255 & 240;
      switch(var3) {
      case 0:
         var2.setOperator(0);
         break;
      case 16:
         var2.setOperator(7);
         break;
      case 32:
         var2.setOperator(1);
         break;
      case 48:
         var2.setOperator(8);
         break;
      case 64:
         var2.setOperator(2);
         break;
      case 80:
         var2.setOperator(4);
         break;
      case 96:
         var2.setOperator(3);
         break;
      case 112:
         var2.setOperator(5);
      }

   }

   private void c(PageSetup var1) throws Exception {
      this.h = this.b.a(this.c);
      var1.a(this.h[0]);
      byte var3 = 2;
      int[] var4 = new int[]{var3};
      String var5 = zcch.a(this.h, var4);
      int var7 = var4[0];
      String[] var2;
      int var6;
      if (var5 != null && !"".equals(var5)) {
         var2 = zasp.a(var5);

         for(var6 = 0; var6 < var2.length; ++var6) {
            if (var2[var6] != null) {
               var1.setHeader(var6, var2[var6]);
            }
         }
      }

      var4[0] = var7;
      var5 = zcch.a(this.h, var4);
      var7 = var4[0];
      if (var5 != null && !"".equals(var5)) {
         var2 = zasp.a(var5);

         for(var6 = 0; var6 < var2.length; ++var6) {
            if (var2[var6] != null) {
               var1.setFooter(var6, var2[var6]);
            }
         }
      }

      var4[0] = var7;
      var5 = zcch.a(this.h, var4);
      var7 = var4[0];
      if (var5 != null && !"".equals(var5)) {
         var2 = zasp.a(var5);

         for(var6 = 0; var6 < var2.length; ++var6) {
            if (var2[var6] != null) {
               var1.setEvenHeader(var6, var2[var6]);
            }
         }
      }

      var4[0] = var7;
      var5 = zcch.a(this.h, var4);
      var7 = var4[0];
      if (var5 != null && !"".equals(var5)) {
         var2 = zasp.a(var5);

         for(var6 = 0; var6 < var2.length; ++var6) {
            if (var2[var6] != null) {
               var1.setEvenFooter(var6, var2[var6]);
            }
         }
      }

      var4[0] = var7;
      var5 = zcch.a(this.h, var4);
      var7 = var4[0];
      if (var5 != null && !"".equals(var5)) {
         var2 = zasp.a(var5);

         for(var6 = 0; var6 < var2.length; ++var6) {
            if (var2[var6] != null) {
               var1.setFirstPageHeader(var6, var2[var6]);
            }
         }
      }

      var4[0] = var7;
      var5 = zcch.a(this.h, var4);
      var7 = var4[0];
      if (var5 != null && !"".equals(var5)) {
         var2 = zasp.a(var5);

         for(var6 = 0; var6 < var2.length; ++var6) {
            if (var2[var6] != null) {
               var1.setFirstPageFooter(var6, var2[var6]);
            }
         }
      }

   }

   private void k() throws Exception {
      this.h = this.b.a(this.c);
      CellArea var1 = zcch.a(this.h, 0);
      byte var2 = 16;
      int[] var3 = new int[]{var2};
      String var4 = zcch.a(this.h, var3);
      int var10 = var3[0];
      var3[0] = var10;
      String var5 = zcch.a(this.h, var3);
      var10 = var3[0];
      var3[0] = var10;
      String var6 = zcch.a(this.h, var3);
      var10 = var3[0];
      var3[0] = var10;
      zcch.a(this.h, var3);
      var10 = var3[0];
      if (var4 != null) {
         HashMap var8 = this.e.e;
         if (var8 != null && var8.containsKey(var4)) {
            zqe var9 = (zqe)var8.get(var4);
            if (var5 == null || "".equals(var5)) {
               var5 = var9.e;
            }
         }
      }

      int var11 = this.d.getHyperlinks().a(var1.StartRow, var1.StartColumn, var1.EndRow - var1.StartRow + 1, var1.EndColumn - var1.StartColumn + 1, var5);
      Hyperlink var12 = this.d.getHyperlinks().get(var11);
      if (var6 != null && var6.length() != 0) {
         var12.setScreenTip(var6);
      }

   }

   void a(PageSetup var1, znb var2) throws Exception {
      this.h = this.b.a(this.c);
      if ((this.h[32] & 255 & 4) == 0) {
         var1.setPaperSize(com.aspose.cells.b.a.zc.a(this.h, 0));
         if (this.j) {
            var1.setFitToPagesWide(com.aspose.cells.b.a.zc.a(this.h, 24));
            var1.setFitToPagesTall(com.aspose.cells.b.a.zc.a(this.h, 28));
         } else {
            var1.setZoom(com.aspose.cells.b.a.zc.a(this.h, 4));
         }

         var1.e(com.aspose.cells.b.a.zc.a(this.h, 8));
         var1.f(com.aspose.cells.b.a.zc.a(this.h, 12));
         if ((this.h[32] & 255 & 64) == 0) {
            var1.setOrientation((this.h[32] & 255 & 2) != 0 ? 0 : 1);
         }
      }

      if ((this.h[32] & 255 & 128) != 0) {
         var1.setFirstPageNumber(com.aspose.cells.b.a.zc.a(this.h, 20));
         var1.setAutoFirstPageNumber(false);
      }

      var1.setOrder((this.h[32] & 255 & 1) != 0 ? 1 : 0);
      var1.setBlackAndWhite((this.h[32] & 255 & 8) != 0);
      var1.setPrintDraft((this.h[32] & 255 & 16) != 0);
      if ((this.h[32] & 255 & 32) != 0) {
         var1.setPrintComments(0);
      }

      if ((this.h[33] & 255 & 1) != 0) {
         var1.setPrintComments(2);
      }

      switch((this.h[33] & 255 & 6) >> 1) {
      case 0:
         var1.setPrintErrors(2);
         break;
      case 1:
         var1.setPrintErrors(0);
         break;
      case 2:
         var1.setPrintErrors(1);
         break;
      case 3:
         var1.setPrintErrors(3);
      }

      byte var3 = 34;
      int[] var4 = new int[]{var3};
      String var5 = zcch.a(this.h, var4);
      int var6 = var4[0];
      if (var2 == null) {
         this.e.j = var5;
      } else {
         var2.b = var5;
      }

   }

   void a(PageSetup var1) {
      this.h = this.b.a(this.c);
      var1.setCenterHorizontally((this.h[0] & 255 & 1) != 0);
      var1.setCenterVertically((this.h[0] & 255 & 2) != 0);
      var1.setPrintHeadings((this.h[0] & 255 & 4) != 0);
      var1.setPrintGridlines((this.h[0] & 255 & 24) == 24);
   }

   void b(PageSetup var1) {
      this.h = this.b.a(this.c);
      var1.setLeftMarginInch(com.aspose.cells.b.a.zc.f(this.h, 0));
      var1.setRightMarginInch(com.aspose.cells.b.a.zc.f(this.h, 8));
      var1.setTopMarginInch(com.aspose.cells.b.a.zc.f(this.h, 16));
      var1.setBottomMarginInch(com.aspose.cells.b.a.zc.f(this.h, 24));
      var1.setHeaderMarginInch(com.aspose.cells.b.a.zc.f(this.h, 32));
      var1.setFooterMarginInch(com.aspose.cells.b.a.zc.f(this.h, 40));
   }

   void c() {
      this.h = this.b.a(this.c);
      int var1 = com.aspose.cells.b.a.zc.a(this.h, 0);
      zani var2 = this.d.getCells().q();

      for(int var3 = 0; var3 < var1; ++var3) {
         this.g = this.c.a();
         if (this.g != 176) {
            return;
         }

         this.h = this.b.a(this.c);
         var2.a(zcch.a(this.h, 0));
      }

   }

   private void l() {
      this.h = this.b.a(this.c);
      Protection var1 = this.d.getProtection();
      var1.a(com.aspose.cells.b.a.zc.e(this.h, 0));
      var1.setAllowEditingContent(this.h[2] == 0);
      var1.setAllowEditingObject(this.h[6] == 1);
      var1.setAllowEditingScenario(this.h[10] == 1);
      var1.setAllowFormattingCell(this.h[14] == 1);
      var1.setAllowFormattingColumn(this.h[18] == 1);
      var1.setAllowFormattingRow(this.h[22] == 1);
      var1.setAllowInsertingColumn(this.h[26] == 1);
      var1.setAllowInsertingRow(this.h[30] == 1);
      var1.setAllowInsertingHyperlink(this.h[34] == 1);
      var1.setAllowDeletingColumn(this.h[38] == 1);
      var1.setAllowDeletingRow(this.h[42] == 1);
      var1.setAllowSelectingLockedCell(this.h[46] == 1);
      var1.setAllowSorting(this.h[50] == 1);
      var1.setAllowFiltering(this.h[54] == 1);
      var1.setAllowUsingPivotTable(this.h[58] == 1);
      var1.setAllowSelectingUnlockedCell(this.h[62] == 1);
   }

   private void m() throws Exception {
      this.c.a(1L);
      int var1 = 0;
      boolean var2 = false;
      Cell var3 = null;

      while(true) {
         this.g = this.c.a();
         byte[] var7;
         byte var13;
         switch(this.g) {
         case 0:
            var1 = this.n();
            break;
         case 1:
            this.h = this.b.a(this.c);
            var3 = this.a(this.h, 0, var1);
            break;
         case 2:
            this.h = this.b.a(this.c);
            var3 = this.a(this.h, 0, var1);
            var3.a(6, com.aspose.cells.b.a.zc.a(this.h, 8));
            break;
         case 3:
            this.h = this.b.a(this.c);
            var3 = this.a(this.h, 0, var1);
            var3.a(3, this.h[8]);
            break;
         case 4:
            this.h = this.b.a(this.c);
            var3 = this.a(this.h, 0, var1);
            var3.a(2, this.h[8] != 0 ? zml.d : zml.e);
            break;
         case 5:
            this.h = this.b.a(this.c);
            var3 = this.a(this.h, 0, var1);
            var3.a(1, com.aspose.cells.b.a.zc.f(this.h, 8));
            break;
         case 6:
            this.h = this.b.a(this.c);
            var3 = this.a(this.h, 0, var1);
            var3.putValue(zcch.d(this.h, 8));
            break;
         case 7:
            this.h = this.b.a(this.c);
            var3 = this.a(this.h, 0, var1);
            int var4 = com.aspose.cells.b.a.zc.a(this.h, 8);
            if (var4 < this.l.e().d()) {
               var3.a(4, this.l.e().a(var4), false);
            }
            break;
         case 8:
            this.h = this.b.a(this.c);
            var3 = this.a(this.h, 0, var1);
            var13 = 8;
            int[] var5 = new int[]{var13};
            String var6 = zcch.a(this.h, var5);
            int var14 = var5[0];
            var14 += 2;
            var7 = new byte[this.h.length - 10 - 4 - var6.length() * 2];
            System.arraycopy(this.h, var14, var7, 0, var7.length);
            var3.b(var7);
            var3.a(4, var6);
            break;
         case 9:
            this.h = this.b.a(this.c);
            var3 = this.a(this.h, 0, var1);
            var13 = 18;
            var7 = new byte[this.h.length - 18];
            System.arraycopy(this.h, var13, var7, 0, this.h.length - 18);
            var3.b(var7);
            var3.a(1, com.aspose.cells.b.a.zc.f(this.h, 8));
            break;
         case 10:
            this.h = this.b.a(this.c);
            var3 = this.a(this.h, 0, var1);
            var13 = 11;
            var7 = new byte[this.h.length - 11];
            System.arraycopy(this.h, var13, var7, 0, this.h.length - 11);
            var3.b(var7);
            var3.a(2, this.h[8] == 1 ? zml.d : zml.e);
            break;
         case 11:
            this.h = this.b.a(this.c);
            var3 = this.a(this.h, 0, var1);
            var13 = 11;
            var7 = new byte[this.h.length - 11];
            System.arraycopy(this.h, var13, var7, 0, this.h.length - 11);
            var3.b(var7);
            var3.a(3, this.h[8]);
            break;
         case 12:
            this.h = this.b.a(this.c);
            var3 = this.a(this.h, 0, (Cell)var3);
            break;
         case 13:
            this.h = this.b.a(this.c);
            var3 = this.a(this.h, 0, (Cell)var3);
            var3.a(6, com.aspose.cells.b.a.zc.a(this.h, 4));
            break;
         case 14:
            this.h = this.b.a(this.c);
            var3 = this.a(this.h, 0, (Cell)var3);
            var3.a(3, this.h[4]);
            break;
         case 15:
            this.h = this.b.a(this.c);
            var3 = this.a(this.h, 0, (Cell)var3);
            var3.a(2, this.h[4] != 0 ? zml.d : zml.e);
            break;
         case 16:
            this.h = this.b.a(this.c);
            var3 = this.a(this.h, 0, (Cell)var3);
            var3.a(1, com.aspose.cells.b.a.zc.f(this.h, 4));
            break;
         case 17:
            this.h = this.b.a(this.c);
            var3 = this.a(this.h, 0, (Cell)var3);
            var3.putValue(zcch.d(this.h, 4));
            break;
         case 18:
            this.h = this.b.a(this.c);
            var3 = this.a(this.h, 0, (Cell)var3);
            int var8 = com.aspose.cells.b.a.zc.a(this.h, 4);
            if (var8 < this.l.e().d()) {
               var3.a(4, this.l.e().a(var8), false);
            }
            break;
         case 146:
            this.c.a(1L);
            return;
         case 426:
            this.h = this.b.a(this.c);
            CellArea var9 = zcch.a(this.h, 0);
            byte[] var10 = new byte[this.h.length - 17];
            System.arraycopy(this.h, 17, var10, 0, var10.length);
            var3.a(new zaz(var9, true, var10));
            var3.g().b(true);
            break;
         case 427:
            this.h = this.b.a(this.c);
            CellArea var11 = zcch.a(this.h, 0);
            byte[] var12 = new byte[this.h.length - 16];
            System.arraycopy(this.h, 16, var12, 0, var12.length);
            var3.a(new zaz(var11, false, var12));
            break;
         default:
            this.i = this.c.b();
            this.c.a((long)this.i);
         }
      }
   }

   private Cell a(byte[] var1, int var2, Cell var3) {
      int var4 = (Integer)this.f.d.get(com.aspose.cells.b.a.zc.a(var1, var2) & 16777215);
      Cell var5 = this.l.getRows().a(var3.getRow(), var3.getColumn() + 1, false, false, false);
      var5.b(var4);
      return var5;
   }

   private Cell a(byte[] var1, int var2, int var3) {
      int var4 = com.aspose.cells.b.a.zc.a(var1, var2);
      int var5 = (Integer)this.f.d.get(com.aspose.cells.b.a.zc.a(var1, var2 + 4) & 16777215);
      Cell var6 = this.l.getRows().a(var3, var4, false, false, false);
      var6.b(var5);
      return var6;
   }

   private int n() {
      this.h = this.b.a(this.c);
      int var1 = com.aspose.cells.b.a.zc.a(this.h, 0);
      Row var2 = this.l.getRows().a(var1, false, false, false);
      var2.f(com.aspose.cells.b.a.zc.e(this.h, 8));
      var2.a((byte)(this.h[11] & 255 & 7));
      var2.a((this.h[11] & 255 & 8) != 0);
      var2.setHidden((this.h[11] & 255 & 16) != 0);
      var2.setHeightMatched((this.h[11] & 255 & 32) >> 5 != 1);
      var2.c((this.h[11] & 255 & 64) != 0);
      if (var2.g()) {
         var2.e((Integer)this.f.d.get(com.aspose.cells.b.a.zc.a(this.h, 4)));
      }

      return var1;
   }

   private void o() {
      this.h = this.b.a(this.c);
      int var1 = com.aspose.cells.b.a.zc.a(this.h, 0);
      int var2 = com.aspose.cells.b.a.zc.a(this.h, 4);
      int var3 = com.aspose.cells.b.a.zc.a(this.h, 8);
      int var4 = com.aspose.cells.b.a.zc.a(this.h, 12);
      var4 = (Integer)this.f.d.get(var4);
      boolean var5 = (this.h[16] & 255 & 1) != 0;
      boolean var6 = (this.h[16] & 255 & 2) != 0;
      boolean var7 = (this.h[17] & 255 & 16) != 0;
      int var8 = this.h[17] & 255 & 7;
      ColumnCollection var9 = this.d.getCells().getColumns();

      for(int var10 = var1; var10 <= var2; ++var10) {
         Column var11 = null;
         if (var2 >= 16383) {
            var11 = var9.a();
            var11.a(var10);
         } else {
            var11 = var9.get(var10);
         }

         var11.c(var4);
         int var12 = this.a.getWorksheets().H();
         if (var3 < 256 + var12) {
            var11.setWidth((double)var3 / (double)(256 + var12));
         } else {
            var11.setWidth((double)(var3 - var12) / 256.0D);
         }

         if (var5) {
            var11.setHidden(true);
         }

         var11.a((byte)var8);
         var11.b(var7);
         if (var2 >= 16383) {
            break;
         }
      }

   }

   private void p() throws Exception {
      boolean var1 = false;
      this.h = this.b.a(this.c);
      this.j = (this.h[1] & 255 & 1) != 0;
      this.d.setOutlineShown((this.h[1] & 255 & 4) != 0);
      this.k = (this.h[2] & 255 & 1) != 0;
      boolean[] var2 = new boolean[]{var1};
      zakp var3 = this.a(this.h, 3, (boolean[])var2);
      var1 = var2[0];
      this.d.j = var3;
      int var4 = com.aspose.cells.b.a.zc.a(this.h, 11);
      if (var4 != -1) {
         this.d.setFirstVisibleRow(var4);
      }

      var4 = com.aspose.cells.b.a.zc.a(this.h, 15);
      if (var4 != -1) {
         this.d.setFirstVisibleColumn(var4);
      }

      this.d.k = zcch.d(this.h, 19);
   }

   private void q() {
      this.c.a(1L);
      zbcj var1 = new zbcj(this.d);
      this.d.a(var1);

      while(true) {
         this.g = this.c.a();
         switch(this.g) {
         case 134:
            this.c.a(1L);
            return;
         case 137:
            this.h = this.b.a(this.c);
            this.d.setShowFormulas((this.h[0] & 255 & 2) != 0);
            this.d.setGridlinesVisible((this.h[0] & 255 & 4) != 0);
            this.d.setRowColumnHeadersVisible((this.h[0] & 255 & 8) != 0);
            this.d.setDisplayZeros((this.h[0] & 255 & 16) != 0);
            this.d.setDisplayRightToLeft((this.h[0] & 255 & 32) != 0);
            this.d.setSelected((this.h[0] & 255 & 64) != 0);
            this.d.setOutlineShown((this.h[1] & 255 & 1) != 0);
            this.d.setFirstVisibleRow(com.aspose.cells.b.a.zc.a(this.h, 6));
            this.d.setFirstVisibleColumn(com.aspose.cells.b.a.zc.a(this.h, 10));
            this.d.f(com.aspose.cells.b.a.zc.a(this.h, 14));
            this.d.setZoom(com.aspose.cells.b.a.zc.b(this.h, 18));
            break;
         case 151:
            this.a(this.d.b());
            break;
         case 152:
            this.a(this.d.s());
            break;
         default:
            this.i = this.c.b();
            this.c.a((long)this.i);
         }
      }
   }

   private void a(PaneCollection var1) {
      this.h = this.b.a(this.c);
      var1.d((int)com.aspose.cells.b.a.zc.f(this.h, 0));
      var1.c((int)com.aspose.cells.b.a.zc.f(this.h, 8));
      var1.a(com.aspose.cells.b.a.zc.a(this.h, 16));
      var1.b(com.aspose.cells.b.a.zc.a(this.h, 20));
      var1.a((byte)com.aspose.cells.b.a.zc.a(this.h, 24));
      this.d.a((this.h[28] & 255 & 1) != 0);
   }

   private void a(zbcj var1) {
      this.h = this.b.a(this.c);
      zbci var2 = new zbci(com.aspose.cells.b.a.zc.a(this.h, 0));
      var2.a(com.aspose.cells.b.a.zc.a(this.h, 4));
      var2.b(com.aspose.cells.b.a.zc.a(this.h, 8));
      var2.c(com.aspose.cells.b.a.zc.a(this.h, 12));
      var2.a(zcch.b(this.h, 16));
      com.aspose.cells.b.a.a.ze.a(var1, (Object)var2);
   }

   private void r() {
      this.h = this.b.a(this.c);
      int var1 = com.aspose.cells.b.a.zc.a(this.h, 0);
      double var2 = 0.0D;
      int var4;
      if (var1 == -1) {
         var4 = com.aspose.cells.b.a.zc.e(this.h, 4);
         int var5 = ((this.a.getWorksheets().I() * (var4 & '\uffff') + this.a.getWorksheets().J()) / (var4 & '\uffff') + 1) * (var4 & '\uffff');
         var2 = (double)(var5 - this.a.getWorksheets().J()) / (double)this.a.getWorksheets().I();
      } else {
         if (256 + this.a.getWorksheets().H() > var1) {
            var2 = (double)var1 / (256.0D + (double)this.a.getWorksheets().H());
         } else {
            var2 = (double)(var1 - this.a.getWorksheets().H()) / 256.0D;
         }

         if (var2 < 0.0D) {
            var2 = 0.0D;
         }
      }

      this.d.getCells().getColumns().a(var2);
      var4 = com.aspose.cells.b.a.zc.e(this.h, 6) & '\uffff';
      if ((this.h[8] & 255 & 2) != 0) {
         var4 = 0;
      }

      this.d.getCells().a = (double)var4;
      this.d.getCells().c(this.h[10]);
      this.d.getCells().b(this.h[11]);
   }

   zakp a(byte[] var1, int var2, boolean[] var3) {
      boolean var4 = false;
      var3[0] = false;
      zakp var5 = new zakp(false);
      switch((var1[var2] & 255) >> 1) {
      case 0:
         var5.a(true);
         break;
      case 1:
         if ((var1[var2 + 1] & 255) >= 64) {
            var5.a(true);
         } else {
            var5.a(3, var1[var2 + 1] & 255);
         }
         break;
      case 2:
         var2 += 4;
         var5.a(2, ((var1[var2] & 255) << 16) + ((var1[var2 + 1] & 255) << 8) + (var1[var2 + 2] & 255));
         break;
      case 3:
         var5.a(4, var1[var2 + 1] & 255);
         var5.a((double)com.aspose.cells.b.a.zc.b(var1, var2 + 2) / 32767.0D);
         break;
      default:
         var3[0] = true;
         var5.a(true);
      }

      return var5;
   }
}
